<?php
function smarty_modifier_yoyobytesize($s) {
  foreach (array('','K','M','G') as $i => $k) { 
    if ($s < 1024) break; 
    $s/=1024; 
  }
  return sprintf("%5.1f %sBytes",$s,$k);  


}
?>
